package com.tencreat.common.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.Getter;

/**
 * 支付类型枚举
 * @author huang wei
 * @version 1.0
 * @date 2021/9/3 10:38
 */
@Getter
public enum PayType {
    /**
     * 支付类型枚举
     * 有买有卖中用户使用消费券支付，消费券有微信、支付两种充值方式
     */
    PLATFORM(0,"平台"),
    WX_PAY(1,"微信支付"),
    ALI_PAY(2,"支付宝支付"),
    ALI_PAY_H5(3,"支付宝H5支付"),
    WX_PAY_H5(4,"微信H5支付"),

    //BALANCE(3,"余额支付"),
    FAST_PAYMENT(9,"快捷支付"),
    CR_PAY(10,"消费券支付"),


    /**
     * 废弃
     */
    @Deprecated
    BANKCARD(4,"银行卡支付"),
    /**
     * 废弃，将在未来不再使用
     */
   /* @Deprecated
    LIAN_BANKCARD(8,"连连渠道银行卡支付"),*/

    /**
     * 废弃
     */
    @Deprecated
    UNPAID(5,"未支付"),;

//    SHOPPING_POINTS(6, "积分支付"),
   // CASH_POINTS(7, "积分支付");

    PayType(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    @EnumValue
    private final int value;
    @JsonValue
    private String desc;

    /**
     * 单个枚举的展示
     */
    @Override
    public String toString() {
        return value + "-" + desc;
    }
}
